// 这个中间件的作用是将接收到的数据再发送给客户端
module.exports = app => {
    return function* (next) {
        this.socket.emit('res', 'packet received!');
        console.log('packet1:', this.packet);
        yield* next;
        console.log('packet2:', this.packet);
    };
};